Correct height calculation in the sections#1105
Correct height calculation in the sections#1105MVilaH wants to merge 3 commits intosimonbengtsson:mainfrom
Conversation
recalculate the dimensions of the sections to return their exact size if you have to use rowSpan in head or foot or both since otherwise it increases the virtual size of the table and creates a new page before you have arrived has occupied the space established in the margins of the sheet.
|
import { jsPDF } from "jspdf"; applyPlugin(jsPDF); const doc = new jsPDF({ for (let i = 0; i < 41; i++) { body.push(r); ] function columnStyles(d, w) { for (let i = 0; i < d; i++) { export default doc; Si ejecutas este código con el código original la página se rompe antes de las 41 filas si no me equivoco por lo menos las 3 últimas filas se van a la página siguiente por el error de cálculo de la altura de las secciones |
|
if you count the number of rows in the body you will realize that it is the same amount but the result completely different. |
|
By the way this error is fixed pull request #1106 |



This code corrects the calculation of the height of the sections when using rowSpan in them since the original code oversized the height of the sections with the dimension of the rows that do not have rowSpan which causes an anticipated page break.